<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>品质优选</title>
		<link rel="stylesheet" type="text/css" href="../font/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../css/jquery-weui.min.css" />
		<link rel="stylesheet" type="text/css" href="../css/weui.css" />
		<style type="text/css">
			* {
				margin: 0px;
				padding: 0px;
				box-sizing: border-box;
			}
			
			html,
			body {
				height: 100%;
			}
			
			#pin-main {
				width: 100%;
				height: 100%;
				background-color: white;
			}
			
			.pin-return {
				width: 100%;
				height: 40px;
				line-height: 40px;
			}
			
			.pin-center {
				width: 100%;
			}
				#lijiqianggou{
			float: right;
			 background-color: red; 
			 color: white; 
			  width: 70px; 
			  height: 30px; 
			  text-align: center;
			   border: none; 
			   border-radius: 10px;
			}

		</style>
	</head>

	<body>
		<div id="pin-main">
			<!--头部-->
			<div class="pin-header">
				<div class="pin-return">
					&nbsp;<span class="iconfont  icon-back" @click="gohistroy">&nbsp;</span><span>品质优选</span>
				</div>
			</div>
			<!--中部-->
			<div class="pin-center">
				<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg" v-for="item in list">
					<div class="weui-media-box__hd">
						<img style="width: 60px; height: 60px; float: left;" class="weui-media-box__thumb" :src="item.attributes.img" />
					</div>
					<div class="weui-media-box__bd">
						<h4 class="weui-media-box__title" v-html="item.attributes.name"></h4>
						<p class="weui-media-box__desc"><span>￥0起送/配送费￥12/评价<span style="color: red;">4.4</span>分</span><input id="lijiqianggou" type="button" value="精选商品"></p>
					</div>
				</a>
			</div>
		</div>
		<script src="../js/av-min-2.1.2.js" type="text/javascript">
		</script>
		<script src="../js/vue.js" type="text/javascript">
		</script>
		<script type="text/javascript">
			var newvue = new Vue({
						el: "body",
						data: {
							list: "",
						},
						created: function() {
							var APP_ID = '9etyUbhi95RBWTaoLBTyW5HP-gzGzoHsz';
							var APP_KEY = '6IkehXVEvUELlpo1SAf1c8PR';
							AV.init({
								appId: APP_ID,
								appKey: APP_KEY
							});
							var mthis = this;
							var query = new AV.Query('Business');
							query.find().then(function(products) {
									for(var i = 0; i < products.length; i++) {
										mthis.list = products;
										console.log(mthis);
									}
							})
						},
						methods:{
							gohistroy:function  () {
								history.go(-1);
							}
						}
							})
		</script>
	</body>

</html>